package com.glp.work.flow.config;

import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import com.glp.work.flow.handler.flowable.factory.ExtActivityBehaviorFactory;

/**
 * 为解决flowable图片中的中文乱码
 *
 * @author puhaiyang
 * @date 2018/12/19
 */
@Configuration
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {

	@Autowired
	public ExtActivityBehaviorFactory extActivityBehaviorFactory;
	
    @Override
    public void configure(SpringProcessEngineConfiguration engineConfiguration) {
        engineConfiguration.setActivityFontName("宋体");
        engineConfiguration.setLabelFontName("宋体");
        engineConfiguration.setAnnotationFontName("宋体");
        engineConfiguration.setDatabaseSchema("panw_test");
    	engineConfiguration.setAsyncExecutorActivate(false);
    	engineConfiguration.setActivityBehaviorFactory(extActivityBehaviorFactory);
    }

}
